1. Field of the Invention
The present invention generally relates to a coding technique for a moving image, and more particularly to a predictive coding technique for coding images by predicting a motion of an object.
2. Description of the Prior Art
FIG. 23 shows a structure of an moving image coding apparatus according to a first conventional technique, which is constructed based on the recommendation H.263 by ITU-T. In the figure, a reference numeral 1 is an input image, 101 is a differentiator, 102 is a prediction signal, 103 is a prediction error signal, 104 is an encoder, 105 is coded data, 106 is a decoder, 107 is a decoded prediction error signal, 108 is an adder, 109 is a local decoded image signal, 110 is a memory, 111 is a predictor, and 112 is a motion vector.
The input image 1 to be coded is input to the differentiator 101. The differentiator 101 determines a difference between the input image 1 and the prediction signal 102 which will be described later, and outputs the difference as the prediction error signal 103. The encoder 104 codes the input image 1 or the prediction error signal 103 and outputs the coded data 105. The encoder 104 uses DCT (Discrete Cosine Transformation), which is one type of quadrature conversions, to convert the prediction error signal 103 from a space domain to a frequency domain, and linearly quantize conversion coefficients obtained by DCT
The coded data 105 obtained by the encoder 104 is then divided into two parts. One part is transmitted to a decoder on the receiver side (not shown), while the other is input to the decoder 106 provided in this apparatus. The decoder 106 operates in a reverse way to the encoder 104, and determines and outputs the decoded prediction error signal 107 from the coded data. The adder 108 adds the decoded prediction error signal 107 to the prediction signal 102, to thereby determine and output the decoded image signal 109. The predictor 111 carries out motion compensative prediction using the input image 1 to be coded and the decoded image signal 109 of the frame located immediately previous to the current frame stored in the memory 110, and outputs the prediction signal 102 and the motion vector 112. Motion compensation is carried out by blocks of a fixed size. Each block is called a macro block consisting of 16.times.16 pixels. For those blocks located at heavy movement part of the image, an optional function is provided to carry out the motion compensative prediction by sub-blocks, each consisting of 8.times.8 pixels, formed by quartering one macro block. The thus obtained motion vector 112 is transmitted to a decoder on the receiver side (not shown), while the prediction signal 102 is sent to the differentiator 101 and the adder 108.
FIG. 24 shows a structure of a moving image coding apparatus according to a second conventional technique. The apparatus is constructed based on the coding system proposed in "A Very Low Bit Rate Video Coder Based on Vector Quantization", IEEE Trans. on Image Processing, Vol. 5, No. 2, February, 1996. In the figure, a reference numeral 113 is an area divider, 114 is a predictor, 115 is an area determinator, 116 is coding mode information, 117 is a motion vector, 118 is an encoder, and 119 is coded data.
As shown in FIG. 24, the system divides the input image 1 into a plurality of areas by the area divider 113. The area divider 113 determines the area shape in accordance with a motion compensative prediction error. Specifically, among predetermined 10 block sizes, i.e., 4.times.4, 4.times.8, 8.times.4, 8.times.8, 8.times.16, 16.times.8, 16.times.16, 16.times.32, 32.times.16, and 32.times.32, the area divider 113 assigns smaller blocks to the areas including heavy movement, while assigning larger blocks to the areas including light movement, such as a background, by judging a distribution of inter-frame signals using a threshold value. More specifically, the area determinator 115 calculates a variance of the prediction error signal obtained by the predictor 114 and determines each block size based on the variance. Attribute information 116, such as the area shape or the coding mode of each area, and the motion vector 117 are also determined at this stage. In accordance with the coding mode information included in the attribute information 116, the encoder 118 codes the prediction error signal or the original signal to obtain the coded data 119. The succeeding procedures are the same as the first conventional technique described above.
The first conventional technique restricts the area shape used as a coding unit to only two types which are both square. As a result, coding is carried out regardless of whether the area is located at little movement part, such as a background, or at heavy movement part, such as edge parts of an object. Thus, this technique is not capable of accomplishing the adaptive coding which dynamically corresponds to the scene configuration.
The second conventional technique provides square blocks of multiple sizes, so that low significance areas are coded coarsely by larger blocks and the high significance areas are coded finely by smaller blocks. Thus, coding can be carried out in accordance with the scene configuration of the image. However, as the area shape is limited to square blocks, this technique has to be improved to realize the adaptive coding corresponding to a desired area shape.
In addition, if coding is carried out for individual areas which are determined by the area division corresponding to a desired area shape, both the amount of calculations involved in the area division and the amount of codes required for the area shape will be increased.